<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
	layout:decorate="content">
<title>用户管理</title>
<head>

</head>
<body>
	<div layout:fragment="content">
		<div class="listCot Organization">
			<div class="Organization_top">
				<p class="top_bg clearfix">
					高级搜索<span class="togBtn fr topToggle"> <a
						data-bind="html:showText,click:$root.noshow"></a>
					</span>
				</p>
				<ul class="mess clearfix otherMess"
					data-bind="with:userinfo,visible:showorno">
					<li><label>部门：</label><input type="text" id="txt_depton"
						data-bind="value:departmentname" placeholder="部门"></li>
					<!-- <li><label>工号：</label><input type="text"
						data-bind="value:uName" placeholder="工号"></li> -->
					<li><label>姓名：</label><input type="text"
						data-bind="value:uname" placeholder="姓名"></li>
					<li class="searchIcon"><input type="submit" value="查询"
						data-bind="click:$root.search"><i class="iconImg"><img
							src="/images/search.png" alt=""></i></li>
					<li class="resetIcon"><input type="submit" value="重置"
						data-bind="click:$root.reset"><i class="iconImg"><img
							src="/images/agin.png" alt=""></i></li>
				</ul>
			</div>
			<div class="Organization_cot">
				<p class="top_bg clearfix">
					<i class="icon popAdd"> <img src="/images/add.png" alt="">
					</i> <a class="Add" data-bind="click:show_add">新增</a>
				</p>
			</div>
		</div>
		<table class="list_page" style="width: 100%;" border="1"
			cellspacing="0">
			<thead>
				<tr>
					<th class="td_top">序号</th>
					<th class="td_top">姓名</th>
					<th class="td_top">部门</th>
					<th class="td_top">邮箱</th>
					<th class="td_top">电话</th>
					<th class="td_top">操作</th>
				</tr>
			</thead>
			<tbody id="tbody" data-bind="foreach:DataGrid.DataRows">
				<tr>
					<td data-bind="text:$index()+1" style="text-align: center;"></td>
					<td id='NumId' data-bind="html:uid" style="display: none;"></td>
					<td data-bind="text:uname" style="text-align: center;"></td>
					<td data-bind="text:departmentName" style="text-align: center;"></td>
					<td data-bind="text:email" style="text-align: center;"></td>
					<td data-bind="text:mobile" style="text-align: center;"></td>
					<td style="text-align: center;width: 157px">
						<input type="button"class="pure-button pure-button-primary" value="修改"data-bind="click:$root.update" />
						<input type="button"class="pure-button button-secondary" value="重置密码"data-bind="click:$root.resetpw" /> 
						<input type="button"class="pure-button button-warning" value="删除"data-bind="click:$root.deleteId" />
					</td>
				</tr>
			</tbody>
		</table>

		<div id="popUser" style="display: none;">
			<table class="table table-hover" data-bind="with:userInfoModel" style="width: 100%; height: 345px;">
				<tr>
					<td class="td_form01">
						<label>
							<span class="tip"style="color: red;">*</span>
							姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名：
						</label>
					</td>
					<td class="td_form02">
						<input id="uname" type="text" data-bind="value:uname,click:$root.unamedo">
						<span id="unamedo" style="color: red;"></span>
					</td>
				</tr>
				<tr>
					<td class="td_form01">
						<label>
							<span class="tip"style="color: red;">*</span>
							电&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;话：
						</label>
					</td>
					<td class="td_form02">
						<input type="text" data-bind="value:mobile">
					</td>
				</tr>
				<tr>
					<td class="td_form01">
						<label>
							<span class="tip"style="color: red;">*</span>
							邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱：
						</label>
					</td>
					<td class="td_form02">
						<input type="text" data-bind="value:email">
					</td>
				</tr>
				<tr style="display: none">
					<td>
						<input id="txtdepid" type="text" data-bind="value:departmentid" >
					</td>
				</tr>
				<tr>
					<td class="td_form01">
						<label>
							<span class="tip"style="color: red;">*</span>
							部&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;门：
						</label>
					</td>
					<td class="td_form02">
						<input type="text" id="txt_dep" data-bind="value:$root.departmentname">
						<i class="icon iconfont icon-sanjiao-bottom"data-bind="click:$root.layerdepclick"></i>
							<div id="treeContent" style="display: none; position: absolute; left: 103px; top: 211px; background-color: #ffffff; z-index: 999; padding: 10px; border-radius: 4px; border: 1px solid red;">
									<ul id="treeDemo" class="ztree"style="margin-top: 0; width: 160px;">
									</ul>
							</div>
					</td>
				</tr>
				<tr>
					<td class="td_form01">
						<label>
							<span class="tip"style="color: red;">*</span>
							岗&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位：
						</label>
					</td>
					<td class="td_form02">
						<select data-bind="options: $root.availablePosts,
								optionsText:'postName',
								optionsValue:'id',
								value:$root.postSelected,
								optionsCaption:'请选择'">
						</select>
					</td>
				</tr>
				<tr>
					<td class="td_form02 text-center" colspan="2">
						<button type="button" class="saveBtn" data-bind="click:$root.submit">
							<i class="iconSave"><img src="/images/ic05.png" alt=""></i>
							保存
						</button>
						<button type="button" class="popClose"data-bind="click:$root.layerClose">
							<i class="popIcon"><img src="/images/ic06.png" alt=""></i>
							关闭
						</button>
					</td>
				</tr>
			</table>
		</div>
		<div th:include="pager :: pager"></div>
		<div id="menuContent"
			style="display: none; position: absolute; z-index: 999;">
			<div layout:fragment="pager"></div>
		</div>
	</div>
</body>
</html>